MultiDictionaryBase Generic Class

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

MultiDictionaryBase is a base class that can be used to more easily implement a class that associates multiple values to a single key. The class implements the generic IDictionary<TKey, ICollection<TValue>> interface.

Namespace: Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax

C#
[SerializableAttribute]
public abstract class MultiDictionaryBase<TKey, TValue> : CollectionBase<KeyValuePair<TKey, ICollection<TValue>>>, IDictionary<TKey, ICollection<TValue>>, 
	ICollection<KeyValuePair<TKey, ICollection<TValue>>>, IEnumerable<KeyValuePair<TKey, ICollection<TValue>>>, 
	IEnumerable
Visual Basic (Declaration)
<SerializableAttribute> _
Public MustInherit Class MultiDictionaryBase(Of TKey, TValue) _
	Inherits CollectionBase(Of KeyValuePair(Of TKey, ICollection(Of TValue))) _
	Implements IDictionary(Of TKey, ICollection(Of TValue)),  _
	ICollection(Of KeyValuePair(Of TKey, ICollection(Of TValue))),  _
	IEnumerable(Of KeyValuePair(Of TKey, ICollection(Of TValue))),  _
	IEnumerable
Visual C++
[SerializableAttribute]
generic<typename TKey, typename TValue>
public ref class MultiDictionaryBase abstract : public CollectionBase<KeyValuePair<TKey, ICollection<TValue>^>>, 
	IDictionary<TKey, ICollection<TValue>^>, ICollection<KeyValuePair<TKey, ICollection<TValue>^>>, 
	IEnumerable<KeyValuePair<TKey, ICollection<TValue>^>>, IEnumerable

Type Parameters

TKey
The key type of the dictionary.
TValue
The value type of the dictionary.

Remarks

To use MultiDictionaryBase as a base class, the derived class must override Count, Clear, Add, Remove(TKey), Remove(TKey,TValue), Contains(TKey,TValue), EnumerateKeys, and TryEnumerateValuesForKey.

It may wish consider overriding CountValues, CountAllValues, ContainsKey, and EqualValues, but these are not required.

Inheritance Hierarchy

See Also